home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / Menu Events 1.1.2 / Menu Events.h < prev   
Text File  |  1994-04-19  |  3KB  |  107 lines

  1. /*______________________________________________________________________
  2.  
  3.     Menu Events
  4.     
  5.     Version 1.1.2
  6.  
  7.     an AWOL Software Production
  8.     PO Box 24207
  9.     300 Eagleson Road
  10.     Kanata, Ontario, Canada K2M 2C3
  11.  
  12.     Internet: ab026@freenet.carleton.ca
  13.     
  14.     Copyright © 1994 Ross Brown.  All rights reserved.
  15. _____________________________________________________________________*/
  16.  
  17.  
  18. /*______________________________________________________________________
  19.     
  20.     'Menu Events'.h - Menu Events Definitions.
  21.  
  22.     This file defines the Apple events which you can send to any
  23.     high-level-event-aware process when Menu Events is installed.
  24.     
  25.     The Query Menu List event returns a list of menu info records,
  26.     each with ID, title, enabled/disabled status, and menu
  27.     definition procedure resource ID.
  28.     
  29.     The Query Menu event, given a menu ID, returns a list of menu
  30.     item records, each with ID, title, enabled/disabled status,
  31.     mark character, icon number, style, and Command-key character.
  32.     
  33.     The Select Menu Item event, given a menu ID and menu item ID,
  34.     causes the target to act as if the given item had been selected
  35.     by the user.  You can optionally specify which modifier keys
  36.     (Shift, Control, Option, Command) are pressed at the time of
  37.     the simulated menu item selection.
  38.     
  39.     Use AppleScript's Script Editor or any Apple event tool to read
  40.     the dictionary for this suite of events from the Menu Events
  41.     Scripting Addition file.  See the Menu Events Sample Script file
  42.     for an example of Menu event scripting.  There is also a full
  43.     description of the Menu Events suite in the Menu Events Help file.
  44. _____________________________________________________________________*/
  45.  
  46.  
  47. #ifndef    __MENU_EVENTS__
  48. #define    __MENU_EVENTS__
  49.  
  50.  
  51. #ifndef    __TYPES__
  52. #include    <Types.h>
  53. #endif
  54.  
  55.  
  56. /* Signature of the Menu Events extension. */
  57.  
  58. #define    kMESignature    'Mænu'
  59.  
  60.  
  61. /* Gestalt selector and response bits for the Menu Events extension. */
  62.  
  63. #define    gestaltMenuEventsAttr    kMESignature
  64.  
  65. #define    gestaltMEQueryEventSupport    0
  66. #define    gestaltMESelectEventSupport    1
  67.  
  68.  
  69. /* Error codes returned by the Menu Events Apple event suite. */
  70.  
  71. #define    noSuchMenuErr    -21000            /* no such menu in menu bar */
  72. #define    noSuchMenuItemErr    -21001        /* no such item in menu */
  73. #define    menuItemDisabledErr    -21002        /* item is disabled */
  74. #define    menuEventPendingErr    -21003        /* another menu event is pending */
  75.  
  76.  
  77. /* Class, ID, and key definitions for the Menu Events Apple event suite. */
  78.  
  79. #define    kMEEventClass    kMESignature
  80.  
  81. #define    kAEMEQueryMenuList    'qmn#'
  82. #define    kAEMEQueryMenu    'qmn '
  83. #define    kAEMESelectMenuItem    'semi'
  84.  
  85. #define    keyMenuID    'mnid'
  86. #define    keyMenuTitle    'mnti'
  87. #define    keyMenuEnabled    'mnen'
  88. #define    keyMenuMDEFID    'mndf'
  89.  
  90. #define    keyMenuItemID    'miid'
  91. #define    keyMenuItemText    'mite'
  92. #define    keyMenuItemEnabled    'mien'
  93. #define    keyMenuItemMark    'mima'
  94. #define    keyMenuItemIcon    'miic'
  95. #define    keyMenuItemStyle    'mist'
  96. #define    keyMenuItemCmd    'micm'
  97.  
  98. #define    keyShiftKeyPressed    'shik'
  99. #define    keyControlKeyPressed    'conk'
  100. #define    keyOptionKeyPressed    'optk'
  101. #define    keyCommandKeyPressed    'comk'
  102.  
  103. #define    keyMenuEventsTattoo    kMESignature    /* null; presence verifies handling of event */
  104.  
  105.  
  106. #endif    __MENU_EVENTS__
  107.